# 转换为整数
s = '2024'
m = int(s)
print(type(m), type(s))
s1 = True
print(int(s1))  # 1

# 转换成浮点数
print(float(s))  # 2024.0
print(float(m))  # 2024.0
print(float(True))  # 1.0
print(float(False))  # 0.0

# 转换为布尔型
print(bool(s))  # True

# 转换成字符串
n = 100
print(str(n))
print(type(str(n)))  # <class 'str'>
f = 1.3
print(type(str(f)))  # <class 'str'>
a = True
print(type(str(a)))  # <class 'str'>
